#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);


}

Widget::~Widget()
{
    delete ui;
}

void Widget::paintEvent(QPaintEvent *ev)
{
    static int pos=0;
    QString pictures[2]={":/res/tabletop.png",""};
    QPainter *painter =new QPainter(this);


    QPixmap pixmap;
    pixmap.load(pictures[pos]);
    pixmap.scaled(512,512);
    painter->drawPixmap(0,0,512,512,pixmap);
}


void Widget::on_pushButtonStart_clicked()
{
    this->close();
    Game *c=new Game;
    c->show();
}


void Widget::on_pushButtonByeBye_clicked()
{
    this->close();
}

